<%--
  Created by IntelliJ IDEA.
  User: Aqqqwer
  Date: 2021/7/6
  Time: 19:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改用户密码</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/header.css"/>
</head>
<script src="/js/jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" th:inline="javascript">
    $(function () {
        var isCheck = false;
        //原密码失去焦点
        $("#oldPassword").blur(function () {
            var oldPassword = $(this).val().trim();
            if (!oldPassword) {
                $('#pwdText').css('color', 'red');
                isCheck = false;
                return;
            }
        })
    }
    );
</script>
<body>
<header class="header">
    <h1><img style="height: 50px;width: 180px"
             src=""
             alt="">
    </h1>
    <form>
        <input type="text" name="search" placeholder="Search.." class="search">
    </form>
    <button class="searchButton searchButton2">立即搜索</button>
    <div class="login">
        <!-- 登录 -->
        <!-- 注册 -->
        <span><a href="login_user.jsp"><input type="button" class="dlspan" value="登 录"/></a></span>&nbsp;&nbsp;
        <span><a href="register_user.jsp"><input type="button" class="zcspan" value="注 册"/></a></span>
        <span><a><input type="button" class="dlspan" value="退出" onclick="exit()"/></a></span>
    </div>
</header>
<div class="topNav">
    <!-- 导航栏 -->
    <div style="float: left;">
        <button style="" class="links_button button dropdown">
            <a href="tuijian.jsp" style="text-decoration: none">推荐</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="yingshi.jsp" style="text-decoration: none">影视</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="yinyue.jsp" style="text-decoration: none">音乐</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="youxi.jsp" style="text-decoration: none">游戏</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="tiyu.jsp" style="text-decoration: none">体育</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="zongyi.jsp" style="text-decoration: none">综艺</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="yule.jsp" style="text-decoration: none">娱乐</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="dongman.jsp" style="text-decoration: none">动漫</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="shenghuo.jsp" style="text-decoration: none">生活</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="meishi.jsp" style="text-decoration: none">美食</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
        <button style="" class="links_button button dropdown">
            <a href="chongwu.jsp" style="text-decoration: none">宠物</a>
            <span class="dropdown-content">
                    <a href="#">1</a>
                    <a href="#">2</a>
                    <a href="#">3</a>
                </span>
        </button>
    </div>
</div>
<div class="img">
    <ul class="vertical">
        <li><a href="${pageContext.request.contextPath}/videos/queryHistory?userId=${param.id}"
               class="verticalLiA">观看历史</a></li>
        <li style="background-color: deepskyblue"><a
                href="${pageContext.request.contextPath}/user/user_center.jsp?id=${param.id}"
                class="verticalLiA">个人信息</a></li>
        <li><a href="#" class="verticalLiA">视频管理</a></li>
        <li><a href="#" class="verticalLiA">我的关注</a></li>
        <li><a href="#" class="verticalLiA">我的粉丝</a></li>
        <li><a href="${pageContext.request.contextPath}/user/update_password.jsp?id=${requestScope.users.id}"
               class="verticalLiA">修改密码</a></li>
    </ul>
    <div style="margin-left:15%;padding-top: 200px;height:1000px;white-space:nowrap;">
        <form action="/user/update_pwd" method="post">
            <ul style="list-style: none">
                <li><h3>修改密码</h3></li>
                <li><span class="pwdText">原密码:<input type="password" name="oldPassword" id="oldPassword" placeholder="请输入原密码"
                                               required></span>
                    <span id="oldPassword2"></span></li>
                <li><span class="s">新密码:<input type="password" name="psd" id="psd" placeholder="请输入新密码" required>
                </span><span id="psd2"></span></li>
                <li><span class="s">新密码:<input type="password" name="confirmPwd" id="confirmPwd" placeholder="请输入确认密码"
                                               required></span>
                    <span id="confirmPwd2"></span></li>
                <input type="hidden" name="id" value="${param.id}">
                <li>
            <span class="s"><button onclick="changePassword()">修改密码</button>
                <button type="reset">重新填写</button></span>
                </li>
            </ul>
        </form>
    </div>
</div>
</body>
</html>
